export function numberValidator(rule, value) {
  if (value === '') {
    return Promise.reject('请输入')
  }

  if (isNaN(Number(value))) {
    return Promise.reject('请输入整数')
  }

  return Promise.resolve()
}
export function integerValidator(rule, value) {
  if (value === '') {
    return Promise.reject('请输入')
  }

  if (isNaN(Number(value)) || !Number.isInteger(Number(value))) {
    return Promise.reject('请输入正整数')
  }

  return Promise.resolve()
}
